package com.zhang.chatcenter.common.api.authority;


//import com.zhang.infrastructure.api.authority.fallback.UserRemoteFallback;
import com.zhang.infrastructure.api.authority.UserRemoteVo;
import com.zhang.infrastructure.model.KingHoodResponseVO;
import com.zhang.infrastructure.model.constant.ServerNameConstant;
import com.zhang.chatcenter.common.api.authority.fallback.UserRemoteFallback;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.List;
import java.util.Map;

/**
 * description
 *
 * @author zhangFanJun
 * @date 2023-12-07 9:47
 **/
@FeignClient(name = ServerNameConstant.AUTHORITY_CENTER, fallback = UserRemoteFallback.class, path = "authorityCenter/user", contextId = "UserRemote")
public interface UserRemote {

    /**
     * 按ID获取用户
     *
     * @param ids ids
     * @author jp
     * @date 2024/01/08
     */
    @PostMapping("/getUserByIds")
    Map<Long, UserRemoteVo> getUserByIds(@RequestParam("ids") List<Long> ids);

    /**
     * 按姓名或帐户获取id列表
     *
     * @param key 钥匙
     * @return @return {@link List }<{@link Long }>
     * @author jp
     * @date 2024/01/10 17:16
     */
    @PostMapping("/getIdListByNameOrAccount")
    List<Long> getIdListByNameOrAccount(@RequestParam("key") String key);

    /**
     * 用户菜单列表
     *
     * @param userId 用户id
     * @return @return {@link KingHoodResponseVO }<{@link List }>
     * @author jp
     * @date 2024/01/15 14:20
     */
    @RequestMapping("/userMenuList")
    KingHoodResponseVO<List> userMenuList(@RequestParam("userId") Long userId);
}
